package oop.day01;

public class CarTest {
    public static void main(String[] args) {
        // 基于类 产生一个对象
        // 定义一个变量  类型 名字= 值; int a=3;
        // 类型 名字 = new 值；
        Car car = new Car();
        car.brand="宝马";
        car.price=20;
        car.color="白色";
        car.capacity=4;

        car.start();
        car.run();
        car.stop();

        Car car2 = new Car();
        car2.brand="比亚迪";
        car2.price=10;
        car2.capacity=5;
        car2.color="黑色";
        car2.capacity=4;

        car2.start();
        car2.run();
        car2.stop();

        Car car3 = new Car("银色","奥迪",25,5);
        car3.start();
        car3.run();
        car3.stop();

        Car car4 = new Car("红色","法拉利",100,2);
        car4.price=120;
        car4.start();
        car4.run();
        car4.stop();



    }
}
